import request from './../axios'
import {requestHandle} from "./../axios";
import {R, API_PREFIX} from "@/assets/js/dict.js"


/**
 *  --------------------------------------- 家教简历 Start ---------------------------------------
 */


/**
 * 家教查看简历列表
 *
 * @method GetListResume
 *
 */

export function GetListResume(params) {
    return request({
        url: '/tutor/action/listResume',
        method: 'get',
        params
    })
}

/**
 * 家教查看审核通过的简历列表
 *
 * @method GetListResumeFroSelect
 *
 */

export function GetListResumeFroSelect(params) {
    return request({
        url: '/tutor/action/listResumeForSelect',
        method: 'get',
        params
    })
}


/**
 * 家教更新简历 POST
 *
 * @method PostUpdateResume
 *
 */

export function PostUpdateResume(params) {
    return request({
        url: '/tutor/action/updateResume',
        method: 'post',
        data: params
    })
}


/**
 * 家教查看简历详情 GET
 *
 * @method GetDetailsResume
 *
 */

export function GetDetailsResume(params) {
    return request({
        url: '/tutor/action/detailsResume',
        method: 'get',
        params
    })
}


/**
 *  家教删除简历
 *
 * @method postDeleteResume
 *
 */

export function postDeleteResume(params) {
    return request({
        url: '/tutor/action/deleteResume',
        method: 'post',
        params
    })
}


/**
 * 保存家教简历
 *
 * @method PostAddResume
 *
 */

export function PostAddResume(params) {
    return request({
        url: '/tutor/action/addResume',
        method: 'post',
        data: params
    })
}

/**
 * 提交审核
 * @param params
 * @returns {AxiosPromise}
 * @constructor
 */
export function PostCommitResume(params) {
    return request({
        url: '/tutor/action/commitResume',
        method: 'post',
        params
    })
}

export function getResumeDisplay(params, call) {
    console.log("getResumeDisplay----> ", params);
    requestHandle(request({
        url: `${API_PREFIX}/tutor/action/getResumeDisplay`,
        method: 'get',
         params
    }), call);
}

/**
 *  --------------------------------------- 家教简历 End ---------------------------------------
 */


